#include "DM4340.h"

void DM_MotorGroup_Init(CAN_HandleTypeDef* hcan, DM_Motor_groupTypeDef* motor,uint8_t motor_num,uint8_t mode)
{
	HAL_Delay(1000);
	for(uint8_t i=0;i < motor_num;i++)
	{
		dm_motor_init(hcan,motor+i,i,0x141+i,mode);
		HAL_Delay(10);
	}
}

void DM_Motor_SoftStart(DM_Motor_groupTypeDef* motor,uint8_t motor_num,uint8_t index)
{
	for(int i=0;i<index;i++)
	{
		for(uint8_t i=0;i < motor_num;i++)
        {
		    dm_motor_ctrl(motor+i);
		    HAL_Delay(10);
	    }	
	}
}
